<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<!-- BEGIN HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN CONTAINER -->
	<!-- BEGIN CONTENT -->
	<div ng-controller="changeOrderController">
		<div class="form-group" style="margin: 0px;" id="queryOrderResportSerchModel">
			<div class="row">
				<label class="col-sm-2 control-label text-right" >订单号</label>
				<div class="col-sm-3">
					<div class="input-group">
						<input type="text" class="form-control" ng-model="orderInfo.orderNo"  ng-disabled="false" />
					 </div>
				</div> 
				<div class="col-sm-1">
					<div class="input-group">
						<button type="button" class="btn btn-primary"  ng-click="queryOrderInfo()"  ><i class="fa "></i>查询</button>
					</div>
				</div>
			</div>				
	</div>
	<hr />
	<table class="table table-striped table-bordered table-hover" id="table_1">
		<thead>
			<tr>
				<th>订单号</th>
				<th>金额</th>
				<th>卡号</th>
				<th>用户名</th>
				<th>主服务</th>
				<th>用户类型</th>
				<th>订单状态</th>
				<th>创建时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<tr class="odd gradeX" ng-repeat-start="l in query track by $index"   ng-click="queryOrderItem($event,l.orderNo)" on-loaded="false" target-table="table_1">
				<td><span ng-bind="l.orderNo"></span></td>
				<td><span ng-bind="l.caculatedTotalPrice"></span></td>
				<td><span ng-bind="l.cardNo"></span></td>
				<td><span ng-bind="l.userName"></span></td>
				<td><span ng-bind="l.serviceName"></span></td>
				<td><span ng-bind="l.userTypeName"></span></td>
				<td><span ng-bind="l.statusName"></span></td>	
				<td><span ng-bind="l.createTime"></span></td>	
				<td><a class="btn" id="{{l.orderNo}}" disabled="true" ng-click="changeOrderAmount(l.orderNo)">修改</a></span></td>	
			</tr>
			<tr hidden="hidden" >
						<td colspan="9">
						<table class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th>子服务名称</th>
										<th>数量</th>
										<th>单价</th>
										<th>总价</th>
										<th>实际价格</th>
										<th>开始时间</th>
										<th>结束时间</th>
								</thead>
								<tr ng-repeat="item in orderItemlist "
									ng-if="item.orderNo==l.orderNo &&(item.unitPrice== null )" class="odd gradeX" >
									<td><span ng-bind="item.serviceSubName"></span></td>
									<!-- ng-change="calculateOrderPrice(l.orderNo,item)" -->
									<td><input ng-value="item.buyNum" type="number" ng-blur='calculateOrderPrice(l.orderNo,item,$event,"buyNum")'></td>
									<td><span ng-bind="item.unitPrice"></span></td>
									<td ><input ng-value="item.totalPrice" type="number"  ng-blur='calculateOrderPrice(l.orderNo,item,$event,"totalPrice")'></td>
									<td><span ng-bind="item.realTotalPrice"></span></td>
									<td><span ng-bind="item.startTime"></span></td>
									<td><span ng-bind="item.endTime"></span></td>
								</tr>
								<tr ng-repeat="item in orderItemlist "
									ng-if="item.orderNo==l.orderNo &&(item.unitPrice!= null )" class="odd gradeX" >
									<td><span ng-bind="item.serviceSubName"></span></td>
									<td><input  ng-value="item.buyNum"  type="number"  ng-blur='calculateOrderPrice(l.orderNo,item,$event,"buyNum")'></td>
									<td ><input ng-value="item.unitPrice"  type="number"   ng-blur='calculateOrderPrice(l.orderNo,item,$event,"unitPrice")' ></td>
									<td ><span ng-bind="item.totalPrice" ></span></td> 
									<td><span ng-bind="item.realTotalPrice"></span></td>
									<td><span ng-bind="item.startTime"></span></td>
									<td><span ng-bind="item.endTime"></span></td>
								</tr>
							</table>
						</td>
			</tr> 	
			<tr ng-repeat-end></tr>
		</tbody>
	</table>
	   <div class="ngPaper">
	     <ngpaper  page-count="pageCount" current-page="currentPage" on-page-change="onPageChange()" first-text="首页" next-text="下一页" prev-text="上一页" last-text="尾页"></ngpaper>
    </div>
</div>
<!-- END CONTENT -->
<!-- END CONTAINER -->
<script src="/static/common/plugin/pagination/src/ng-pagination.js" type="text/javascript"/>
<link href="/static/common/plugin/pagination/src/ng-pagination.css" rel="stylesheet" />
<script>
$(function(){dz_public_init();});
</script>
</body>
<!-- END BODY -->
</html>